#ifndef RENLIAN_H
#define RENLIAN_H

#include <QWidget>
#include <QMainWindow>
#include <QMediaDevices>
#include <QCameraDevice>
#include <QCamera>
#include <QMediaCaptureSession>
#include <QImageCapture>
#include <QDebug>
#include <QThread>
#include <QJsonDocument>
#include <QJsonObject>
#include <QJsonArray>
#include "cJSON.h"
#include <QNetworkAccessManager>
#include <QNetworkReply>
#include <QSslSocket>
#include <iostream>
#include <string.h>
#include <fstream>
#include <memory>
#include <QMessageBox>
namespace Ui {
class renlian;
}

class renlian : public QWidget
{
    Q_OBJECT

public:
    explicit renlian(QWidget *parent = nullptr);
    ~renlian();
    std::string getFileBase64Content(const char *path, bool urlencoded = false);
    std::string getAccessToken();
    void processBaiduFaceMatchResponse(const QByteArray &responseData);

private slots:
    void on_pushButton_2_clicked();

    void on_pushButton_clicked();

private:
    Ui::renlian *ui;
    QCamera * camera;
    QMediaCaptureSession * pSession;//媒体捕获对象，能够捕获视频或者摄像头的画面
    QImageCapture * imageCapture;//截图工具
};

#endif // RENLIAN_H
